If what you need can only be obtained in a larger quantity, then khums is not applicable on what remains from that. For example, if you need a notebook of 20 pages, but you could not find a 20-page notebook, and the closest to it is a 100-page notebook, then the unused part of the notebook will not be subject to khums. Similarly, if you need 20 pens, and you can purchase 20 pens without needing to buy 100 pens, then the unused pens will be subject to khums.